package com.igeek.boot.servlet; /**
 * @package ${PACKAGE_NAME}
 * @Description ${description}
 * @Author LittlePunk [296526219@qq.ccom]
 * @Version 2022.1
 * @Date 2023/12/10 16:04
 */

import javax.servlet.*;
import javax.servlet.annotation.*;
import java.io.IOException;

//@WebFilter(filterName = "MyFilter",urlPatterns = "/css/*")
public class MyFilter implements Filter {
    public void init(FilterConfig config) throws ServletException {
        System.out.printf("MyFilter init初始化~");
    }

    public void destroy() {
        System.out.printf("MyFilter init初始化~");
    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws ServletException, IOException {
        System.out.println("MyFilter doFilter过滤~");
        chain.doFilter(request, response);
    }
}
